export enum formType {
  input = 'input',
  select = 'select',
  textarea = 'textarea',
  colorPicker = 'colorPicker',
  multipleSelect = 'multipleSelect',
  dateTimePicker = 'dateTimePicker',
  default = '',
}

export type ISelectOption = {
  label: string;
  value: any;
};

export type IItemConfig = {
  type: formType;
  label: string;
  prop: string;
  isShow?: boolean;
  width?: number;
  placeholder?: string;
  disabled?: boolean; //默认值false
  labelWidth?: number;
  rules?: Array<any>;
  options?: Array<ISelectOption>;
  colorList?: Array<string> //colorPicker时可选用
  defaultTime?: Array<Date> | any //dateTimePicker 和 datePicker时可选用  默认时间
  format? : string;  //dateTimePicker 和 datePicker时可选用
  valueFormat? : IValueFormat;//dateTimePicker 和 datePicker时可选用
};

export enum IValueFormat {
  timeStamp = 'x',
  default = 'YYYY-MM-DD HH:mm:ss',
  bias = 'YYYY/MM/DD HH:mm:ss',
  biasTime = 'YYYY/MM/DD hh:mm:ss a',  //HH代表24小时制，hh代表12小时制
  lineTime = 'YYYY-MM-DD hh:mm:ss a',
}

export interface IGlobleFormProps {
  inline?: boolean;
  bindData: any;
  itemWidth?: number;
  itemConfig: Array<IItemConfig>;
}
